//main.js
import {createApp} from 'vue';
import App from './App.vue';
import '@/assets/main.css'
// 导入数据请求
import axios from 'axios'
//导入ElementUI
import ElementUI from 'element-plus'
import 'element-plus/dist/index.css'
//导入icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入Pinia状态管理
import {createPinia} from 'pinia'
import router from '@/router/router.js'
//导入dataV
import DataV from '@kjgl77/datav-vue3';

const app = createApp(App);

app.config.globalProperties.$axios = axios;
app.config.productionTip = false

app.use(ElementUI)
//注册el-icon
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(createPinia())

app.use(router);

app.use(DataV, {classNamePrefix: 'dv-'});

// Mount the app with the router
app.mount('#app');